//
//  CGPoint+Extension.swift
//  mall-ios
//
//  Created by Meak Tsui on 2018/12/17.
//  Copyright © 2018 Meak Tsui. All rights reserved.
//

import Foundation
import UIKit

extension CGPoint {
    public static func + (lhs: CGPoint, rhs: CGPoint) -> CGPoint {
        return CGPoint(x: lhs.x+rhs.x, y: lhs.y+rhs.y)
    }
    
    public static func - (lhs: CGPoint, rhs: CGPoint) -> CGPoint {
        return CGPoint(x: lhs.x-rhs.x, y: lhs.y-rhs.y)
    }
    
    public static func * (lhs: CGPoint, rhs: CGPoint) -> CGPoint {
        return CGPoint(x: lhs.x*rhs.x, y: lhs.y*rhs.y)
    }
    
    public static func / (lhs: CGPoint, rhs: CGPoint) -> CGPoint {
        return CGPoint(x: lhs.x/rhs.x, y: lhs.y/rhs.y)
    }
}
